﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Food" MasterPageFile="~/masterpage/Main.Master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div class="row carousel-holder">

        <div class="col-md-12">
            <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                </ol>
                <div class="carousel-inner">
                    <asp:EntityDataSource ID="edsImages" runat="server" ConnectionString="name=FosIntelEntities" DefaultContainerName="FosIntelEntities" EnableFlattening="False" EntitySetName="fos_Setting" Select="it.[ParamName], it.[ParamValue]" Where="it.[ParamName]= &quot;Image&quot;">
                    </asp:EntityDataSource>
                    <asp:Repeater ID="repeaterIamge" runat="server" DataSourceId="edsImages">
                         
                         <ItemTemplate>
                            <div class='<%# Container.ItemIndex == 0 ? "item active" : "item"  %>'>
                                <img class="slide-image" src='<%# Eval("ParamValue") %>' alt=""  height="600" width="800"/>
                            </div>
                        </ItemTemplate>

                    </asp:Repeater>
                   <%-- <div class="item active">
                        <img class="slide-image" src="http://1.bp.blogspot.com/_wjO9ZSr8ZTA/S8dAoPOHqwI/AAAAAAAAId4/Jzj3FesR28I/s1600/SSWF-NasiLemak.jpg" alt="">
                    </div>
                    <div class="item">
                        <img class="slide-image" src="http://2.bp.blogspot.com/_WjoOlj-Sj04/S_xzV95sSaI/AAAAAAAAEAM/gRvZXGrIZnw/s1600/roti+telur.jpg" alt="">
                    </div>
                    <div class="item">
                        <img class="slide-image" src="http://4.bp.blogspot.com/_CUMQ1Rgv1Ks/TOUMfUYGNjI/AAAAAAAADww/9UdJ5QTzv98/s1600/m_pg08nasigoreng.jpg" alt="">
                    </div>--%>
                </div>
                <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                </a>
                <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span>
                </a>
            </div>
        </div>

    </div>

    <div class="row">

        <asp:Repeater ID="Repeater1" runat="server" OnItemDataBound="Repeater1_ItemDataBound">
            <ItemTemplate>

                <div id='<%# "Panel"+ Eval("Id")%>' class="col-sm-4 col-lg-4 col-md-4 corner">
                    <h2 id='<%# "H2"+ Eval("Id")%>'><%#Eval("isPromotion").ToString() =="1" ? "Promotion": "0" %></h2>
                    <div class="thumbnail">
                        <img alt="" src='<%#  "GetImage.aspx?id=" +  Eval("Id") %>' />
                        <%--  <img src="http://placehold.it/320x150" alt="">--%>
                        <div class="caption">
                            <h4 class="pull-right">RM<%# Eval("isPromotion").ToString() =="1" ? Eval("PromotionPrice") + "(" + Eval("FoodPrice") + ")" :Eval("FoodPrice") %></h4>
                            <h4><b><%# Eval("FoodName")%> </b>
                            </h4>
                            <p><%# Eval("FoodDescription")%></a>.</p>

                        </div>


                    </div>
                </div>

            </ItemTemplate>
        </asp:Repeater>


    </div>

    <script>
        $(document).ready()
        {
            var div = $("h2:contains('0')").parent();
            div.removeClass("corner");
            div.addClass("Nocorner");
            div.find("h2").remove();



        }


    </script>

</asp:Content>


